import request from "@/utils/request";
export function courseList(params) {
  return request({
    url: "/api/backend/course/page",
    method: "get",
    params,
  });
}
export function addCourse(data) {
  return request({
    url: "/api/backend/course/add",
    method: "post",
    data,
  });
}
export function delCourse(data) {
  return request({
    url: "/api/backend/course/del/batch",
    method: "delete",
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    params: data,
  });
}
// 通过id查询课程详情信息'
export function queryCourse(id) {
  return request({
    url: `/api/backend/course/${id}`,
    method: "get",
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
  });
}
// 修改课程信息
export function updateCourse(data) {
  return request({
    url: "/api/backend/course/update",
    method: "put",
    data,
  });
}
